﻿@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/BaseView.cshtml";
}
@{
    Common.Web.Cookie cookie = new Common.Web.Cookie();
    int visiterId = Convert.ToInt32(cookie.GetCookie("LoginUserId"));
    BenefitHelper.DB.DBManager db = new BenefitHelper.DB.DBManager();
    if (BenefitHelper.Sys.VisitPrower.HasAdminPrower(visiterId, db))
    { 
    <div id="buttons">
        <span>
            <p>
                <a href="/Init" target="_blank" title="后台管理">后台管理</a>
            </p>
        </span>
    </div>
    }
    db.Dispose();
}
<dl id="xiangmu">
    <dt><span id="title2">@ViewBag.group.GroupName</span></dt>
    <dd>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="group">
            <tr>
                <td style="border-left: 1px solid #ecc7b5;">
                    <a href="/GroupShow/IndexShow/@ViewBag.gid/@ViewBag.groupquerydate">
                        <img src="/Content/images/icon_07.gif" />盘中统计</a>
                </td>
                <td class="selected">
                    <img src="/Content/images/icon_02.gif" />信息汇总
                </td>
                <td>
                    <a href="/GroupXingNeng/Index/@ViewBag.gid/@ViewBag.pdate">
                        <img src="/Content/images/icon_02.gif" />历史数据</a>
                </td>
            </tr>
        </table>
    </dd>
</dl>
<div id="bigDataBox">
    <div class="date-select-bar">
        @for (int i = 1; i <= 12; i++)
        {
            if (!string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
            {


                if (Convert.ToInt32(ViewBag.querymonth) == i)
                {
            <a class='cur'>@i</a>
                }
                else
                {
                    if (i < 10)
                    {
                        string z = "0" + i;
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear@z">@i</a>
                    }
                    else
                    {
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear@i">@i</a>
                    }

                }
            }
            else
            {
                if (i < 10)
                {
                    string z = "0" + i;
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear@z">@i</a>
                }
                else
                {
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear@i">@i</a>
                }

            }
        }
        @if (string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
        {
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear" class='cur'>整年数据</a>
        }
        else
        {
            <a href="/GroupCompare/Index/@ViewBag.gid/@ViewBag.queryyear">整年数据</a>
        }
    </div>
    <div class="date-select-bar" style="text-align: right; float: right;">
        @for (int i = 2011; i <= DateTime.Now.Year; i++)
        {
            if (Convert.ToInt32(ViewBag.queryyear) == i)
            {
            <a href="/GroupCompare/Index/@ViewBag.gid/@i@ViewBag.querymonth" class='cur'>@i</a>
            }
            else
            {
            <a href="/GroupCompare/Index/@ViewBag.gid/@i@ViewBag.querymonth">@i</a>
            }
        }
    </div>
    <br />
    <br />
    <div>
        <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
            <img src="/content/images/chengjiaogaikuang.png" />
        </div>
        <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;">
            <tr>
                <td style="text-align: center;" class="title">
                    <span class="down">亏损</span>
                </td>
                <td style="text-align: center;" class="title">
                    1个Tick
                </td>
                <td style="text-align: center;" class="title">
                    2个Tick
                </td>
                <td style="text-align: center;" class="title">
                    3个Tick
                </td>
                <td style="text-align: center;" class="title">
                    4个Tick
                </td>
                <td style="text-align: center;" class="title">
                    5个Tick
                </td>
                <td style="text-align: center;" class="title">
                    6个Tick
                </td>
                <td style="text-align: center;" class="title">
                    7个Tick
                </td>
                <td style="text-align: center;" class="title">
                    8个Tick
                </td>
                <td style="text-align: center;" class="title">
                    9个Tick
                </td>
                <td style="text-align: center;" class="title">
                    10个Tick
                </td>
                <td style="text-align: center;" class="title">
                    更多
                </td>
            </tr>
            <tr>
                <td style="text-align: center;" class="leftyes">
                    合计
                </td>
                @if (!string.IsNullOrEmpty(ViewBag.querymonth))
                {
                    int all = 0;
                    foreach (BenefitHelper.Data.Month.GroupMonthWinOrLoseTick t in ViewBag.winticks)
                    {
                        all++;
                        if (all == ViewBag.winticks.Count)
                        {
                    <td style="text-align: center;" class="leftyes bottomyes">
                        @t.Count
                    </td>
                        }
                        else
                        {
                    <td style="text-align: center;" class="bottomyes">
                        @t.Count
                    </td>
                        }

                    }
                }
                else
                {
                    int all = 0;
                    foreach (BenefitHelper.Data.Year.GroupYearWinOrLoseTick t in ViewBag.winticks)
                    {
                        all++;
                        if (all == ViewBag.winticks.Count)
                        {
                    <td style="text-align: center;" class="leftyes">
                        @t.Count
                    </td>}
                        else
                        {
                    <td style="text-align: center;">
                        @t.Count
                    </td>}
                    }
                }
            </tr>
        </table>
        <div style="height: 3px; line-height: 3px;">
        </div>
        <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;">
            <tr>
                <td style="text-align: center;" class="title">
                    <span class="raise">盈利</span>
                </td>
                <td style="text-align: center;" class="title">
                    1个Tick
                </td>
                <td style="text-align: center;" class="title">
                    2个Tick
                </td>
                <td style="text-align: center;" class="title">
                    3个Tick
                </td>
                <td style="text-align: center;" class="title">
                    4个Tick
                </td>
                <td style="text-align: center;" class="title">
                    5个Tick
                </td>
                <td style="text-align: center;" class="title">
                    6个Tick
                </td>
                <td style="text-align: center;" class="title">
                    7个Tick
                </td>
                <td style="text-align: center;" class="title">
                    8个Tick
                </td>
                <td style="text-align: center;" class="title">
                    9个Tick
                </td>
                <td style="text-align: center;" class="title">
                    10个Tick
                </td>
                <td style="text-align: center;" class="title">
                    更多
                </td>
            </tr>
            <tr>
                <td style="text-align: center;" class="bottomyes">
                    合计
                </td>
                @if (!string.IsNullOrEmpty(ViewBag.querymonth))
                {
                    int all = 0;
                    foreach (BenefitHelper.Data.Month.GroupMonthWinOrLoseTick t in ViewBag.lostticks)
                    {
                        all++;
                        if (all == ViewBag.lostticks.Count)
                        {
                    <td style="text-align: center;" class="bottomyes leftyes">
                        @t.Count
                    </td>
                        }
                        else
                        {
                    <td style="text-align: center;" class="bottomyes">
                        @t.Count
                    </td>
                        }

                    }
                }
                else
                {
                    int all = 0;
                    foreach (BenefitHelper.Data.Year.GroupYearWinOrLoseTick t in ViewBag.lostticks)
                    {
                        all++;
                        if (all == ViewBag.lostticks.Count)
                        {
                    <td style="text-align: center;" class="bottomyes leftyes">
                        @t.Count
                    </td>
                        }
                        else
                        {
                    <td style="text-align: center;" class="bottomyes">
                        @t.Count
                    </td>
                        }
                    }
                }
            </tr>
        </table>
    </div>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <div style="height: 5px; line-height: 5px;">
    </div>
    @*    <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
        <img src="/content/images/shujufenxi.png" />
    </div>
    <table style="width: 100%;">
        <tr>
            <td style="width: 40%; vertical-align: top;">
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;" id="table1">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                        </td>
                        <td class="title" style="text-align: right;">
                            日
                        </td>
                        <td class="title" style="text-align: right;">
                            周
                        </td>
                        <td class="title" style="text-align: right;">
                            月
                        </td>
                        <td class="title" style="text-align: right;">
                            年
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            收益率
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.daysum.Yield<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.weeksum.Yield<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.monthsum.Yield<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.yearsum.Yield<span class="raise">↑</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            平均胜率
                        </td>
                        <td style="text-align: right;">
                            100000<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            10000<span class="raise">↑</span>
                        </td>
                        <td style="text-align: right;">
                            5000<span class="raise">↑</span>
                        </td>
                        <td style="text-align: right;">
                            5000<span class="down">↓</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            资金利用率
                        </td>
                        <td style="text-align: right;">
                            100000<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            90000<span class="raise">↑</span>
                        </td>
                        <td style="text-align: right;">
                            70000<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            20000<span class="raise">↑</span>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            收益比率
                        </td>
                        <td style="text-align: right;">
                            100000<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            600<span class="raise">↑</span>
                        </td>
                        <td style="text-align: right;">
                            266<span class="down">↓</span>
                        </td>
                        <td style="text-align: right;">
                            334<span class="raise">↑</span>
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 60%; vertical-align: top;">
                <div style="width: 100%; height: 300px;" id="showflash2">
                </div>
            </td>
        </tr>
    </table>*@
    <div style="width: 100%; height: 300px;" id="showflash2">
    </div>
    <div class="report-tip">
        <div class="report-tip-text">
            <div>
                <b>功能说明：</b></div>
            <div>
                亏损性成交：相对于当前（统计时间显示的时间）股票价格，在所有当日已经的成交中对于买入用户处于亏损的成交分布。<br />
                获利性成交：相对于当前（统计时间显示的时间）股票价格，在所有当日已经的成交中对于买入用户处于获利的成交分布。<br />
                成交均价：所有处于亏损或获利的不同成交单子中进行统计，平均成交价格。</div>
        </div>
        <div class="report-tip-close">
            &nbsp;</div>
        <div class="report-tip-text">
            <div>
                <b>使用帮助：</b></div>
            <div>
                本内容主要是将大小单成交与获利与亏损结合起来，以便于用户可以通过分析来获取有利于交易的市场交易习惯和潜在交易机会。</div>
        </div>
        <div class="report-tip-text">
            <div>
                <b>数据更新：</b></div>
            <div>
                盘中数据动态更新，更新间隔5分钟，由于运算因素，实时成交数据整体延时约5-10分钟。</div>
        </div>
    </div>
</div>
@MvcHtmlString.Create(ViewBag.js)
<script type="text/javascript">
    MonthAreaBenefitPic();
    function showDetail() {
        if ($('#ad').attr('class') == "detailsold") {
            $("#ad").removeClass("detailsold").addClass("detailsoldclick");
        } else {
            $("#ad").removeClass("detailsoldclick").addClass("detailsold");
        }
        $(".detailslist").toggle();
    }
</script>
